<html>
<head>
    <link rel="stylesheet/less" href="<?php echo base_url(); ?>layout_lib/lib/bootstrap.less" />
    <script src="<?php echo base_url(); ?>javascript/jquery-1.7.min.js" type="text/javascript" ></script>
    <script src="<?php echo base_url(); ?>javascript/less-1.1.5.min.js" type="text/javascript" ></script>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
  
  <div class="container-fluid">
        <div class="topbar-wrapper" style="z-index: 5;">
    <div class="topbar" data-dropdown="dropdown">
      <div class="topbar-inner">
        <div class="container">
          <h3><a href="#">E-Farmácia</a></h3>
          <ul class="nav">
            <li class="active"><a href="<?php echo site_url("/"); ?>">Início</a></li>
            <li><a href="<?php echo site_url("pagina/contatos"); ?>">Contatos</a></li>
            <li><a href="<?php echo site_url("medicamentos/pesquisa"); ?>">Medicamentos</a></li>
            <li><a href="<?php echo site_url("pagina/farmacias"); ?>">Farmácias</a></li>
          </ul>
          
          <?php if (is_logged_in()){
            ?> 
          <ul>
              <li id="topbar_user_info"><p>Bem-vindo <?php echo get_user()->username; ?>!</p></li>
              <li><a href="<?php echo site_url("auth/logout"); ?>" class="btn primary" id="logout_button">Logout</a></li>
          </ul>
            <?php  
          } else {
            ?>
          <form action="<?php echo site_url("auth/login"); ?>" method="post">
                <input type="text" name="username" style="height: 30px; width: 150px;" placeholder="Utilizador">
                <input type="password" name="password" style="height: 30px; width: 150px;" placeholder="Password">
                <input type="hidden" name="login_form" value="1" />
                <input type="submit" class="btn primary" value="Login" style="height: 30px; color:#fff; background-color: #0071ad" />
            </form>

          <?php
          }
          ?>
          
        </div>
      </div><!-- /topbar-inner -->
    </div><!-- /topbar -->
  </div>
      <div style="clear: both; margin-top: 50px; "></div>